package com.beehoo.dcportal.action;

import java.util.List;

import com.beehoo.dcportal.common.base.BaseAction;
import com.beehoo.dcportal.common.base.BaseException;
import com.beehoo.dcportal.model.LeaderBean;
import com.beehoo.dcportal.model.MenuBean;
import com.beehoo.dcportal.service.ILeaderServ;

public class LeaderAction extends BaseAction{
	private static final long serialVersionUID = 4990663428835611851L;
	private List<LeaderBean> leaderList;
	private ILeaderServ leaderServ;
	private List<MenuBean> subMenuLs;
	
	public List<MenuBean> getSubMenuLs() {
		return subMenuLs;
	}

	public void setSubMenuLs(List<MenuBean> subMenuLs) {
		this.subMenuLs = subMenuLs;
	}
	
	public ILeaderServ getLeaderServ() {
		return leaderServ;
	}
	public void setLeaderServ(ILeaderServ leaderServ) {
		this.leaderServ = leaderServ;
	}
	public List<LeaderBean> getLeaderList() {
		return leaderList;
	}
	public void setLeaderList(List<LeaderBean> leaderList) {
		this.leaderList = leaderList;
	}
	
	@Override
	public String execute() throws Exception {
		try{
			setClickedMenu(paramMap.get("msgType"));
			
			leaderList = leaderServ.getLeaderList(paramMap.get("streetId"));
			subMenuLs = getSubMenuList(getCurrMenu().getMenuId());
		}catch (BaseException e) {
			setMessage(e.getMessage());
			return ERROR;
		}
		
		return SUCCESS;
	}
}
